﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace BiffenService.Model
{
    [DataContract]
    public class Movie : IComparable<Movie>
    {
        [DataMember]
        public int Id { get; set; }
        [DataMember]
        public string Title { get; set; }
        [DataMember]
        public int Duration { get; set; }
        [DataMember]
        public int Year { get; set; }
        [DataMember]
        public string Actors { get; set; }
        [DataMember]
        public string Directors { get; set; }
        [DataMember]
        public PriceCategory PriceCategory { get; set; }
        [DataMember]
        public string Summary { get; set; }

        public Movie(int id, string title, int duration, int year, string actors, string directors, PriceCategory priceCategory, string summary)
        {
            Id = id;
            Title = title;
            Duration = duration;
            Year = year;
            Actors = actors;
            Directors = directors;
            PriceCategory = priceCategory;
            Summary = summary;
        }

        public Movie()
        {
            // TODO: Complete member initialization
        }

        
        public int CompareTo(Movie other)
        {
            return Title.CompareTo(other.Title);
        }
    }
}
